window.onload=function(){
    let mydiv=document.getElementById("mydiv")
    // mydiv.style.backgroundColor ="red"
    console.log(typeof mydiv)
    if(mydiv instanceof HTMLElement){
        mydiv.style.backgroundColor='red'
    }
}